import React, {PureComponent} from "react"
import myShopCompose from "../../compose"
import Shops from "../shops"
import "../../index.less"
import {withRouter} from "react-router"
import {rootPath} from "../../../../shared/init";
import { ArrowLeftOutlined } from '@ant-design/icons';
import { Button, Col, Row } from "antd";
import {defaultSize} from "../../../../shared/project-config";


export default @withRouter @myShopCompose class MyShopView extends PureComponent {


  render() {
    const {
      _shopData,
      history
    } = this.props

    return (
      <div className={'my-shop-page ld2-content-page absolute'}>
        {
          <Shops data={_shopData || []}>
            <div className={'si-button-bar'}>
              <Row gutter={16}>
                <Col span={8}/>
                <Col span={16}>
                  <Button size={defaultSize} type={'primary'}
                          onClick={() => history.push(`/${rootPath}/my-shop`)}>
                    <ArrowLeftOutlined /> 返回
                  </Button>
                </Col>
              </Row>
            </div>
          </Shops>
        }
      </div>
    );
  }
}